package com.huluobo.a2307douyindemo.shop

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2307douyindemo.R
import com.huluobo.a2307douyindemo.utils.ImageUtils
import com.huluobo.lib_base.bean.CommentBean

/**
 *  Created by LC on 2025/9/24.
 */
class DetailCommentAdapter : BaseQuickAdapter<CommentBean, BaseViewHolder>(R.layout.item_comment) {
    override fun convert(holder: BaseViewHolder, item: CommentBean) {
        if (!item.icon.isNullOrEmpty()) {
            ImageUtils.loadImage(context, item.icon, holder.getView(R.id.item_comment_icon_iv))
        }
        holder.setText(R.id.item_comment_name_tv, item.username)
        holder.setText(R.id.item_comment_msg_tv, item.msg)
        holder.setText(R.id.item_comment_time_tv, item.createtime)
    }
}